<?php

require_once("functions.php");

if(!isset($_GET['bowler'])) {
	header("Location: index.php");
	exit();
} else {
	$sql="INSERT INTO bowlers (name,games,avg,pins,score) VALUES ('{$_GET['bowler']}',0,0,0,0)";
	$db=connectDB();
	$db->query($sql);
	$db->disconnect();
	header("Location: index.php");
	exit();
}
?>
